import http from '@/utils/http/axios'
import { RequestEnum } from '@/enums/httpEnum'
/**
 * @description: 听课列表
 */
export function getSourceList(params) {
  return http.request(
    {
      url: '/ds/homepage/courselist',
      method: RequestEnum.POST,
      params
    },
  )
}

// 获取课程选择
export function getChooseType(params) {
  return http.request(
    {
      url: `/ds/choose`,
      method: RequestEnum.POST,
      params
    }
  )
}
// 课程详情
export function getCourseDetail(params) {
  return http.request(
    {
      url: `/ds/screen/course/detail`,
      method: RequestEnum.POST,
      params
    }
  )
}

// 获取评课数据
export function getEvaluateDetail(params) {
  return http.request(
    {
      url: `/ds/screen/evaluate/detail`,
      method: RequestEnum.POST,
      params
    }
  )
}
// 提交数据
export function submitCourseData(params) {
  return http.request(
    {
      url: `/ds/common/submit`,
      method: RequestEnum.POST,
      params
    },
    {
      successMessageText: '提交评课成功'
    }
  )
}
